# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=musl-locales
pkgver=0.1.0
pkgrel=1
arch="all"
url="https://git.adelielinux.org/adelie/musl-locales/-/wikis/home"
pkgdesc="Locales support for musl"
license="LGPL-3.0-only"
options="!check" # No test suite
makedepends="cmake gettext-dev samurai"
subpackages="$pkgname-lang"
source="https://git.adelielinux.org/adelie/musl-locales/-/archive/$pkgver/musl-locales-$pkgver.tar.bz2
	add-all-available-locales.patch
	"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		"$CMAKE_CROSSOPTS"
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

lang() {
	default_lang
	license="MIT"
}

sha512sums="
4c7ae748f70d02195d221ea9b37e0f033e15c9364b797313727303830fb1d848693facb5267a1d7f354508383d72817e3322f001d86842fa716cecf6ef95c7ff  musl-locales-0.1.0.tar.bz2
dac294f9e6207686b8dcbedfc71db4e7e8c648ca6e11992dd6b606e0fcefc44d15db192753f8a6c902941a5aa9540e54fac2747bfa59058b087c46c49ac314de  add-all-available-locales.patch
"
